package apk.yoursms.settings;

import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import apk.yoursms.R;

public class NotificationUtils {

    public static final int _ID = 1;

    public static void setNotification(Context context, String title,
	    String site) {
	NotificationManager mNotificationManager = (NotificationManager) context
		.getSystemService(Context.NOTIFICATION_SERVICE);
	mNotificationManager.cancelAll();

	int icon = R.drawable.icon;
	long when = System.currentTimeMillis();

	Notification notification = new Notification(icon, title, when);

	Intent notificationIntent = new Intent();
	PendingIntent contentIntent = PendingIntent.getActivity(context, 0,
		notificationIntent, 0);

	notification.setLatestEventInfo(context, title, site, contentIntent);

	mNotificationManager.notify(_ID, notification);
    }

}
